/* 
 * GrayRabbit Cms基于J2EE架构内容管理系统
 * Copyright © GrayRabbit Co., Ltd. All rights reserved.
 * Department：运营部
 * 更多信息，请visit:
 * http://code.google.com/p/gray-rabbit-cms/
 */
package org.grayrabbit.cms.dao.system; 

import java.util.List;

import org.grayrabbit.cms.entity.Role;
import org.grayrabbit.cms.entity.RoleOperRela;
import org.grayrabbit.cms.vo.system.RoleOperRelaBean;

import org.grayrabbit.dao.GenericDao;
import org.grayrabbit.dao.util.Page;
import org.grayrabbit.dao.util.QueryCondition;

/**
 * <b>RoleOperRela</b>的DAO接口

 * @version 1.0,创建时间:2011-05-16 15:55:06 
 */
public interface RoleOperRelaDao extends GenericDao<RoleOperRela, String>{
	
	/**
	 * 根据bean组装查询条件
	 */
	public QueryCondition assembly(RoleOperRelaBean bean);
	/**
	 * 根据bean组装统计查询条件
	 */
	public QueryCondition assemblyCount(RoleOperRelaBean bean);
	public int count(RoleOperRelaBean bean);
	/**
	 * 根据bean组装查询条件(名称参数)
	 */
	public QueryCondition assermblyNameQuery(RoleOperRelaBean bean);
	/**
	 * 填充分页组件
	 * @param page
	 * @param bean
	 */
	public List<RoleOperRela> findByPage(Page<RoleOperRela> page, RoleOperRelaBean bean);
	
	/**
	 * 根据bean组装统计查询条件(名称参数)
	 */
	public QueryCondition assemblyNameQueryCount(RoleOperRelaBean bean);
	/**
	 *  查找 某Role 的所有权限
	 */
	public List<RoleOperRela> findAllAuthCodeByRoleId(String roleId);
 
	public List<RoleOperRela> findObjectAuth(String targetId,String targetType);
	
	/**获取角色Id， 参数 ： 权限码ID  操作对象Id*/
	public List<Role> findCategoryAuditorsRole(String codeId,String targetId);
}